﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ThridGroup.ERP.DTO.ProductionSystem;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace ThridGroup.ERP.ProductionSystem
{  
    /// <summary>
    /// 工序接口
    /// </summary>
    public interface IProcedureServices : IApplicationService
    {
        /// <summary>
        /// 添加工序
        /// </summary>
        /// <param name="createProcedureDto">工序信息</param>
        /// <returns>工序ID</returns>
        Task<int> AddProcedure(CreateProcedureDto createProcedureDto);

        /// <summary>
        /// 更新工序
        /// </summary>
        /// <param name="updateProcedureDto">工序信息</param>
        /// <returns>工序ID</returns>
        Task<int> UpdateProcedure(CreateProcedureDto updateProcedureDto);

        /// <summary>
        /// 删除工序
        /// </summary>
        /// <param name="id">工序ID</param>
        /// <returns>工序ID</returns>
        Task<int> DeleteProcedure(int id);

        /// <summary>
        /// 批量删除工序
        /// </summary>
        /// <param name="ids">工序ID列表</param>
        /// <returns>成功删除的数量</returns>
        Task<int> BatchDeleteProcedure(List<int> ids);

        /// <summary>
        /// 导出工序列表到XLSX
        /// </summary>
        /// <param name="queryDto">查询条件</param>
        /// <returns>Excel文件的字节数组</returns>
        Task<byte[]> ExportToExcel(QueryProcedureDto queryDto);

        /// <summary>
        /// 获取工序详情
        /// </summary>
        /// <param name="id">工序ID</param>
        /// <returns>工序信息</returns>
        Task<ProcedurelistDto> GetProcedureById(int id);

        /// <summary>
        /// 获取工序列表
        /// </summary>
        /// <param name="queryDto">查询条件</param>
        /// <returns>工序列表</returns>
        Task<PagedResultDto<ProcedurelistDto>> GetProcedureList(QueryProcedureDto queryDto);
    }
}
